<?php

require('./roots.php');

require_once('./classes/rbac.php');

include('languaje/'.$_SESSION['lang'].'/lang_'.$_SESSION['lang'].'_rbac.php');

include "header.php";

$action='FuncionModificarRol.php';

$msj = '';


if(isset($_GET['name'])){
    $rbac= new rbac();
    $role1=$rbac->Buscar_rol($_GET['name'],$_SESSION['sess_login_username']);
    $role=$role1;
}

?>

 <form method="post" action="<?php echo $action; ?>" name="regform" ENCTYPE="multipart/form-data" onSubmit="return chkform(this)"> 


	<div id="page">
	<div id="page-bgtop">
	<div id="page-bgbtm">
		<div id="content">
			<div class="post">
			<div class="post-bgtop">
			<div class="post-bgbtm">
				<h2 class="title"><a href="#"><?php echo $LDModificarRol; ?></a></h2>
					
				<div class="entry">
					<p>
						

                                        <?php echo $Message; ?>
					<div class="table">
                                                <table width=100%>
							<tr>
								<td >
									<?php echo $LDNombre; ?>:
								</td>
								<td >
									<input type="text" name="name" value="<?php echo $role[0]['name']; ?>"/>
                                                                        <input type="hidden" name="old_name" value="<?php echo $role[0]['name']; ?>"/>
								</td>
							</tr>
                                                        <tr>
								<td >
									<?php echo $LDEstado; ?>
								</td>
								<td >
									<select name="estado">
										<option value=1><?php echo $LDActivo; ?></option>
										<option value=0><?php echo $LDInactivo; ?></option>
									</select>
								</td>
							</tr>
						</table>
                                   	</div>		
						<div id="botones">
							<h1><a onclick="document.forms[0].submit()"><?php echo$LDModificar; ?></a></h1>

						</div>
					</p>
				</div>
			</div>
			</div>
			</div>
			
		<div style="clear: both;">&nbsp;</div>
		</div>

		<div id="sidebar">
				<ul>
					<li>
						<h2><?php echo$LDCategorias; ?></h2>

						<?php

						include "MenuRbac.php";

						?>
						<script type="text/javascript">

						cssdropdown.startchrome("chromemenu")

						</script>
				</li>
			</ul>
		</div>

		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	</div>
</div>
</form>
<?php

include "footer.php";

?>

